package com.dayatang.hrm.compensation.vo;

import java.text.ParseException;
import java.util.Date;

import org.apache.commons.lang.time.DateUtils;

import com.dayatang.hrm.compensation.CompensationConstant;

public class RealDateValue extends RealValue {

	/**
	 * 
	 */
	private static final long serialVersionUID = -905302009181968460L;

	public static String DATE_FORMAT_PATTERN = CompensationConstant.DATE_FORMAT_PATTERN;

	@Override
	public Date getRealValue() {
		try {
			return DateUtils.parseDate(getValue(),
					new String[] { DATE_FORMAT_PATTERN });
		} catch (ParseException e) {
			throw new RuntimeException(e);
		}
	}
}
